package cn.snowheart.strategy.order;

import cn.snowheart.strategy.order.entity.OrderDTO;
import cn.snowheart.strategy.order.enums.OrderType;
import cn.snowheart.strategy.order.service.IOrderService;
import cn.snowheart.strategy.order.service.OrderServiceV1Impl;
import cn.snowheart.strategy.order.service.OrderServiceV2Impl;

/**
 * @author liuwanxiang
 * @version 2019/06/24
 */
public class OrderTests {

    public static void main(String[] args) {
        testV1();
        testV2();
    }

    private static void testV1() {
        IOrderService service = new OrderServiceV1Impl();
        OrderDTO order = new OrderDTO(OrderType.NORMAL);
        System.out.println(service.handle(order));
    }

    private static void testV2() {
        IOrderService service = new OrderServiceV2Impl();
        OrderDTO order = new OrderDTO(OrderType.NORMAL);
        System.out.println(service.handle(order));
    }

}
